#ifndef __STUCON__
#define __STUCON__

#include <string>
#include <unordered_map>
#include <sstream>

#include "Const.h"
#include "MapFunc.h"
#include "IdManager.h"
#include "Student.h"

/**
 * 学生控制器
 */
class StudentController {
    private:
        // 学生表
        std::unordered_map<std::string,Student*> studentMap;
    public:
        StudentController();
        ~StudentController();
        Student* createStudent(std::string name);
        Student* createStudent(std::string id,std::string name);
        int getStudentCount();
        Student* findStudentById(std::string id);
        void listAllStudent(Student* (&studentList)[]);
        void deleteStudent(Student* stu);
        Student* strToStudent(std::istringstream &iss);
};

#endif